<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="tutorial.css">
<TITLE>
User-Defined Constraints
</TITLE>
</HEAD>
<BODY >
<A HREF="tutorial048.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="tutorial046.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="tutorial050.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc104">7.3</A>&nbsp;&nbsp;User-Defined Constraints</H2><UL>
<LI><A HREF="tutorial049.html#toc57">Generalised Propagation: <EM>propia</EM></A>
<LI><A HREF="tutorial049.html#toc58">Constraint Handling Rules: <EM>ech</EM></A>
</UL>

<A NAME="toc57"></A>
<H3 CLASS="subsection"><A NAME="htoc105">7.3.1</A>&nbsp;&nbsp;Generalised Propagation: <EM>propia</EM></H3>
<A NAME="@default175"></A>
<A NAME="shortsecpropia"></A>
The predicate <EM>infers</EM> takes as one argument
any user-defined predicate, and as a second argument a form of
propagation to be applied to that predicate.<BR>
<BR>
This functionality enables the user to turn any predicate into a
constraint [<A HREF="tutorial133.html#LeProvost93b"><CITE>14</CITE></A>]. The forms of propagation include finite
domains and intervals.
For more details see chapter <A HREF="tutorial107.html#chappropiachr">15</A>.<BR>
<BR>
<A NAME="toc58"></A>
<H3 CLASS="subsection"><A NAME="htoc106">7.3.2</A>&nbsp;&nbsp;Constraint Handling Rules: <EM>ech</EM></H3>
<A NAME="@default176"></A>
<A NAME="@default177"></A>
<A NAME="shortsecech"></A>
The user can also specify predicates using rules with guards
[<A HREF="tutorial133.html#Fruehwirth"><CITE>9</CITE></A>]. 
They delay until the guard is entailed or disentailed, and then
execute or terminate accordingly. <BR>
<BR>
This functionality enables the user to implement constraints in a way
that is clearer than directly using the underlying <EM>suspend</EM>
library.
For more details see chapter <A HREF="tutorial107.html#chappropiachr">15</A>.<BR>
<BR>
<HR>
<A HREF="tutorial048.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="tutorial046.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="tutorial050.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
